home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / var / db / pkg / dev-lang / nasm-0.98.39-r1 / nasm-0.98.39-r1.ebuild < prev    next >
Text File  |  2005-10-29  |  1KB  |  68 lines

  1. # Copyright 1999-2005 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: /var/cvsroot/gentoo-x86/dev-lang/nasm/nasm-0.98.39-r1.ebuild,v 1.1 2005/05/17 22:56:40 mr_bones_ Exp $
  4.  
  5. inherit toolchain-funcs
  6.  
  7. DESCRIPTION="groovy little assembler"
  8. HOMEPAGE="http://nasm.sourceforge.net/"
  9. SRC_URI="mirror://sourceforge/nasm/${P}.tar.bz2"
  10.  
  11. LICENSE="LGPL-2.1"
  12. SLOT="0"
  13. KEYWORDS="-* amd64 x86"
  14. IUSE="doc build"
  15.  
  16. DEPEND="!build? ( dev-lang/perl )
  17.     doc? ( virtual/ghostscript
  18.         sys-apps/texinfo )
  19.     sys-devel/gcc"
  20. RDEPEND=""
  21.  
  22. src_unpack() {
  23.     unpack ${A}
  24.     cd "${S}"
  25.     if [ "$(gcc-major-version)" -eq "2" ] ; then
  26.         sed -i \
  27.             -e 's:-std=c99::g' \
  28.             configure \
  29.             || die "sed failed"
  30.     fi
  31.     #security fix for bug #92991
  32.     sed -i \
  33.         -e '/vsprintf/c\    vsnprintf(buffer, sizeof(buffer), format, ap);
  34.         ' output/outieee.c \
  35.         || die "sed failed"
  36. }
  37.  
  38. src_compile() {
  39.     econf || die
  40.  
  41.     if use build; then
  42.         emake nasm || die "emake failed"
  43.     else
  44.         emake all || die "emake failed"
  45.         emake rdf || die "emake failed"
  46.         if use doc ; then
  47.             emake doc || die "emake failed"
  48.         fi
  49.     fi
  50. }
  51.  
  52. src_install() {
  53.     if use build; then
  54.         dobin nasm || die "dobin failed"
  55.     else
  56.         dobin nasm ndisasm rdoff/{ldrdf,rdf2bin,rdf2ihx,rdfdump,rdflib,rdx} \
  57.             || die "dobin failed"
  58.         dosym /usr/bin/rdf2bin /usr/bin/rdf2com
  59.         doman nasm.1 ndisasm.1
  60.         dodoc AUTHORS CHANGES ChangeLog INSTALL README TODO
  61.         if use doc; then
  62.             doinfo doc/info/*
  63.             dohtml doc/html/*
  64.             dodoc doc/nasmdoc.*
  65.         fi
  66.     fi
  67. }
  68.